package com.wind.controller;

import com.wind.config.PropConfig;
import com.wind.entity.FileContent;
import com.wind.entity.FileList;
import com.wind.entity.ReqDataBean;
import com.wind.model.FileDetail;
import com.wind.model.LeoResult;
import com.wind.service.KylinService;
import com.wind.util.Tools;
import com.wind.util.UploadUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Author: wind
 * @Description:
 * @Date: 2018/8/9 上午9:45
 */
@Controller
@RequestMapping("/input")
public class InputController {

    private Logger logger = LoggerFactory.getLogger(InputController.class);

    @Autowired
    KylinService kylinService;

    @Autowired
    PropConfig propConfig;

    @RequestMapping("/demo")
    String demo() {
        return "demo";
    }

    @RequestMapping("/testTime")
    @ResponseBody
    String testTime() {
        ReqDataBean reqDataBean = ReqDataBean.getInstance();


        //请求地址
        String url = "http://localhost:8080/testSAA?filetype=1";
        //入参
       String filetype= "1";
        List<String> SaaTimeAll= new ArrayList<>();
//        requestBean.setTest1("1");
//        requestBean.setTest2("2");
//        requestBean.setTest3("3");

        RestTemplate restTemplate = new RestTemplate();
        String result = restTemplate.postForObject(url,filetype,String.class);
        return result;
    }


}